function CE.Rogue(arg1, goat2)
--arg1 = "v1" or "v2" for debugging
--goat2: "0" = Buffs, "1" = Melee, "2" = Ranged or instant , 3 = Food and potions,
--goat2: "4" = Boss Burst buffs, "pvp" = PvP combo, "aoe" = aoe skils	
    local Skill = {}
    local Skill2 = {}
    local i = 0
	-- CE globals
    local IgnorableMobs = CE.IgnorableMobs
	
    -- Player and target status.
    local combat = GetPlayerCombatState()
    local enemy = UnitCanAttack("player","target")
	local phealth = PctH("player")
    local thealth = PctH("target")
	local playerHP = (UnitHealth("player"))
	local targetHP = UnitHealth("target")
	local pctEB1 = PctM("player")
	local pctEB2 = PctS("player")
    local EnergyBar1 = UnitMana("player")
	local EnergyBar2 = UnitSkill("player")
    local tbuffs = BuffList("target")
    local pbuffs = BuffList("player")
    local tDead = UnitIsDeadOrGhost("target")
	local ammo = (GetEquipSlotInfo(10) ~= nil)
	local zoneid = (GetZoneID() % 1000)
    local SeigeWar = (zoneid == 402) -- The "Seige War" Zone
	local behind = (not UnitIsUnit("player", "targettarget"))
	--local behind1 = IsUsableAction(9) -- # is your blind spot spell slot number
	local melee = GetActionUsable(46)  -- # is your melee range spell slot number
    local boss = UnitSex("target") >= 3
    local elite = UnitSex("target") == 2
    local party = GetNumPartyMembers() >= 2
	local PetExists = UnitExists("playerpet") 
	local MobName = UnitName("target")
	local bowslot = GetEquipSlotInfo(11) == "interface\\CharacterFrame\\Equipment-RangedSlot" -- check if you have bow equiped
	
	-- Combat engin config locals
	local EqSwapChek = CE_Settings[CE.playerName]["Tab2"]["Eq_Protect_Check"]
	local PetProtectChek = CE_Settings[CE.playerName]["Tab2"]["Pet_Protect_Check"]
	local HpAlarmChek = CE_Settings[CE.playerName]["Tab2"]["HP_Alarm_Check"]
	local EqSwap = tonumber(CE_Settings[CE.playerName]["Tab2"]["Eq_Protect"])
	local PetProtect = tonumber(CE_Settings[CE.playerName]["Tab2"]["Pet_Protect"])
	local HpAlarm = tonumber(CE_Settings[CE.playerName]["Tab2"]["HP_Alarm"])
	local SwapTo = tonumber(CE_Settings[CE.playerName]["Tab2"]["Swap_to_Slot"])
	
	-- Food And pot Dropdown menu locales
	local Rebuff = tonumber(CE_Settings[CE.playerName]["Tab3"]["Rebuff"])
	local HpDef = tonumber(CE_Settings[CE.playerName]["Tab3"]["HpDef"])
	local HpDef_Use = (not pbuffs[CE.BuffCheck("HpDef")] or pbuffs[CE.BuffCheck("HpDef")].time <= Rebuff)
	local HpDef_Check = CE_Settings[CE.playerName]["Tab3"]["HpDef_Check"]
	local DmgFood = tonumber(CE_Settings[CE.playerName]["Tab3"]["DmgFood"])
	local DmgFood_Use = (not pbuffs[CE.BuffCheck("DmgFood")] or pbuffs[CE.BuffCheck("DmgFood")].time <= Rebuff)
	local DmgFood_Check = CE_Settings[CE.playerName]["Tab3"]["DmgFood_Check"]
	local SpeedPot = tonumber(CE_Settings[CE.playerName]["Tab3"]["SpeedPot"])
	local SpeedPot_Use = not pbuffs[CE.BuffCheck("SpeedPot")]
	local SpeedPot_Check = CE_Settings[CE.playerName]["Tab3"]["SpeedPot_Check"]
	local CritFood = tonumber(CE_Settings[CE.playerName]["Tab3"]["CritFood"])
	local CritFood_Use = not pbuffs[CE.BuffCheck("CritFood")]
	local CritFood_Check = CE_Settings[CE.playerName]["Tab3"]["CritFood_Check"]
	local CritPot = tonumber(CE_Settings[CE.playerName]["Tab3"]["CritPot"])
	local CritPot_Use = not pbuffs[CE.BuffCheck("CritPot")]
	local CritPot_Check = CE_Settings[CE.playerName]["Tab3"]["CritPot_Check"]
	local Sigil = tonumber(CE_Settings[CE.playerName]["Tab3"]["Sigil"])
	local Sigil_Use = not pbuffs[CE.BuffCheck("Sigil")]
	local Sigil_Check = CE_Settings[CE.playerName]["Tab3"]["Sigil_Check"]
	local ISFood =  tonumber(CE_Settings[CE.playerName]["Tab3"]["ItemShop"])
	local ISFood_Use = (not pbuffs[CE.BuffCheck("ItemShop")] or pbuffs[CE.BuffCheck("ItemShop")].time <= Rebuff)
	local ISFood_Check = CE_Settings[CE.playerName]["Tab3"]["ItemShop_Check"]
	local Realgar = CE_Settings[CE.playerName]["BurstSlim"]["Realgar"]
	local Realgar_Use = (not pbuffs[501616] or pbuffs[501616].time <= Rebuff)
	local Hero = CE_Settings[CE.playerName]["BurstSlim"]["Hero_Pot"]
	local Hero_Use = (not pbuffs[501337] or pbuffs[501337].time <= Rebuff)
	local LongBuff = CE_Settings[CE.playerName]["BurstSlim"]["5MinBuff"]
	
    --Silence, Substitute and Protect Logic
	local silenceList = CE.silenceList
	local protectList = CE.protectList
	local subList = CE.subList
    local tSpell,tTime,tElapsed = UnitCastingTime("target")
    local silenceThis = tSpell and silenceList[tSpell] and ((tTime - tElapsed) > 0.1)
    local protect = tSpell and protectList[tSpell] and ((tTime - tElapsed) > 0.1)
    local subThis = tSpell and subList[tSpell] and ((tTime - tElapsed) > 0.1)
	
	--Determine Class-Combo
    mainClass, subClass = UnitClassToken( "player" )
	
    --Begin Player Skill Sequences
    
        --Rogue = THIEF, Scout = RANGER, Mage = MAGE, Knight = KNIGHT, 
        --Druid = DRUID, Priest = AUGUR, Warden = WARDEN, Warrior = WARRIOR
		--Champion = PSYRON, Warlock = HARPSYN
        
	--######################--
    --# ROGUE CLASS COMBOS #--
	--######################--
    if mainClass == "THIEF" then
		-----------------
		-- ROGUE/SCOUT --
		-----------------
		if subClass == "RANGER" then
			--Timers for this class
			CreateDIYCETimer("SSBleed", 6.5) --Change the value between 6 -> 7.5 depending on your lag.
			CreateDIYCETimer("LBBleed", 8.5) --Change the value between 7 ->  8.5 depending on your lag.
			--goat2: 0 = Buffs, 1 = Melee, 2 = Ranged, 3 = Cooldowns & Potions, 4 = Longer Cooldowns
            
			if (goat2 == "0") then
				Skill =  {
					{ name = "Combat Master",                      	use = (not pbuffs["Combat Master"]) },
					{ name = "ItemID: 207200",		use = not pbuffs[506684] and CE.HaveItem(207200) and CE.ItemCD(207200)},	-- Unbridled Enthusiasm
					--{ name = "ItemID: 207202", 		use = not pbuffs[506686] and CE.HaveItem(207202) and CE.ItemCD(207202)},	-- Clear Thought
					{ name = "ItemID: 207203",		use = not pbuffs[506687] and CE.HaveItem(207203) and CE.ItemCD(207203)},	-- Lucky Target
					{ name = "ItemID: 207206", 		use = not pbuffs[506690] and CE.HaveItem(207206) and CE.ItemCD(207206)},	-- Scarlet Love
					{ name = "Poison",                      		use = ((not pbuffs["Poisonous"]) and CE.HaveItem(200762)) },
						}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
					{ name = "Informer",                           use = ((not pbuffs["Informer"])) },
					{ name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs["Strong Stimulant"])) },
					{ name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end

			if ((enemy) and (goat2 == "1")) then
				Skill2 = {
					{ name = "Energy Thief",                       use = ((boss) and (EnergyBar1 < 20) and (thealth < 0.6) and (not pbuffs["Energy Thief"])) },
					{ name = "Wound Attack",                       use = ((EnergyBar1 >= 35) and ((tbuffs[500654]) and (tbuffs[620314]))) },
					{ name = "Blind Spot",                         use = (((EnergyBar1 >= 25) and (boss) and (behind)) and (pbuffs["Energy Thief"] or pbuffs["Premeditation"])) },
					{ name = "Shadowstab",                         use = (EnergyBar1 >= 20),       timer = "SSBleed",  ignoretimer = not tbuffs[500654]},
					{ name = "Low Blow",                           use = (((EnergyBar1 >= 25) and (tbuffs[500654])) or (pbuffs["Energy Thief"])),      timer = "LBBleed",   ignoretimer = pbuffs["Energy Thief"] },
					{ name = "Throat Attack",                      use = ((EnergyBar2 >= 50) and (boss or elite) and (silenceThis)) },
					{ name = "Func: arrow_knife1(arrow)",      use = ((not bowslot) and (not tbuffs[501690])) },
					{ name = "Shot",                               use = (bowslot) },
					{ name = "Vampire Arrows",                     use = ((EnergyBar2 >= 20) and (not tbuffs[501690]) and (bowslot))},
					{ name = "Wrist Attack",                       use = ((EnergyBar2 >= 50) and (boss)) },
					{ name = "Func: arrow_knife1(knife)",      use = ((bowslot) and (tbuffs[501690])) },
					{ name = "Combo Throw",                        use = (not bowslot) },
					{ name = "Throw",                              use = (not bowslot) },
						}
			elseif ((enemy) and (goat2 == "pvp")) then
				Skill2 = {
					{ name = "Energy Thief",                       use = ((boss) and (EnergyBar1 < 20) and (thealth < 0.6) and (not pbuffs["Energy Thief"])) },
					{ name = "Wound Attack",                       use = ((EnergyBar1 >= 35) and ((tbuffs[500654]) and (tbuffs[620314]))) },
					{ name = "Blind Spot",                         use = (((EnergyBar1 >= 25) and (boss) and (behind)) and (pbuffs["Energy Thief"] or pbuffs["Premeditation"])) },
					{ name = "Shadowstab",                         use = (EnergyBar1 >= 20),       timer = "SSBleed",  ignoretimer = not tbuffs[500654]},
					{ name = "Low Blow",                           use = (((EnergyBar1 >= 25) and (tbuffs[500654])) or (pbuffs["Energy Thief"])),      timer = "LBBleed",   ignoretimer = not tbuffs["Energy Thief"] },
					{ name = "Throat Attack",                      use = ((EnergyBar2 >= 50) and (boss or elite) and (silenceThis)) },
					{ name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
					{ name = "Wrist Attack",                       use = ((EnergyBar2 >= 50) and (boss)) },
					{ name = "Joint Blow",                         use = (EnergyBar2 >= 20) },
					{ name = "Shot",                               use = (true) },
						}
			elseif ((enemy) and (goat2 == "2")) then
				Skill2 = {
					{ name = "Func: arrow_knife1(arrow)",      use = ((not bowslot) and (not tbuffs[501690])) },
					{ name = "Shot",                               use = (bowslot) },
					{ name = "Vampire Arrows",                     use = ((EnergyBar2 >= 20) and (not tbuffs[501690]) and (bowslot))},
					{ name = "Func: arrow_knife1(knife)",      use = ((bowslot) and (tbuffs[501690])) },
					{ name = "Combo Throw",                        use = (not bowslot) },
					{ name = "Throw",                              use = (not bowslot) },
						}
			end
		-------------------------
		--     ROGUE/MAGE      --05.09.2013
		-------------------------
		elseif subClass == "MAGE" then
			--Timers for this class
			CreateDIYCETimer("SSBleed", 6.5) --Change the value between 6 -> 7.5 depending on your lag.
			CreateDIYCETimer("LBBleed", 8.5) --Change the value between 7 ->  8.5 depending on your lag.
			CreateDIYCETimer("ComboT", 7)
			--goat2: 0 = Buffs, 1 = Melee, 2 = Ranged, 3 = Cooldowns & Potions, 4 = Longer Cooldowns
           
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end

			if ((enemy) and (goat2 == "1")) then --DPS
				Skill2 = {
				    { name = "Func: CE.Item(200004)",	use = phealth < 0.40 and CE.HaveItem(200004)},				                    --Healing Sigil
					{ name = "ID: 491187",     use = (true),   timer = "ComboT",   ignoretimer = (EnergyBar1 <= 20) },              --Combo Throw
					{ name = "ID: 490313",     use = ((EnergyBar1 >= 35) and ((tbuffs[620313]) and (tbuffs[620314]))) },            --Wound Attack
					{ name = "ID: 490311",     use = (((EnergyBar1 >= 25) and (boss) and (behind)) and (pbuffs[500961])) },         --Blind Spot
					{ name = "ID: 490323",     use = ((EnergyBar1 >= 30) and (tbuffs[620313])) },                                   --Low Blow
					{ name = "ID: 490306",     use = (EnergyBar1 >= 20), timer = "SSBleed", ignoretimer = not tbuffs[620313]},      --Shadowstab
					{ name = "ID: 491187",     use = (true) },                                                                      --Combo Throw
					{ name = "ID: 490309",     use = (true) },                                                                      --Throw
					{ name = "ID: 491183",     use = (true) },                                                                      --Day of Rain
						} 
			elseif ((enemy) and (goat2 == "2")) then --Range
				Skill2 = {
					{ name = "ID: 491187",     use = (true) },                                                                      --Combo Throw
					{ name = "ID: 490309",     use = (true) },                                                                      --Throw
						}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {
				    { name = "ID: 491179",     use = (not pbuffs[501279]) },                                                        --Enchanted Throw
					{ name = "ID: 491187",     use = (true),   timer = "ComboT",   ignoretimer = (EnergyBar1 <= 20) },              --Combo Throw
					{ name = "ID: 490313",     use = ((EnergyBar1 >= 35) and ((tbuffs[620313]) and (tbuffs[620314]))) },            --Wound Attack
					{ name = "ID: 490311",     use = (((EnergyBar1 >= 25) and (boss) and (behind)) and (pbuffs[500961])) },         --Blind Spot
					{ name = "ID: 490323",     use = ((EnergyBar1 >= 30) and (tbuffs[620313])) },                                   --Low Blow
					{ name = "ID: 490306",     use = (EnergyBar1 >= 20), timer = "SSBleed", ignoretimer = not tbuffs[620313]},      --Shadowstab
					{ name = "ID: 491187",     use = (true) },                                                                      --Combo Throw
					{ name = "ID: 490309",     use = (true) },                                                                      --Throw
					{ name = "ID: 491183",     use = (true) },
					}
			end
		-------------------------
		--    ROGUE/KNIGHT     --
		-------------------------
		elseif subClass == "KNIGHT" then
			--Timers for this class
			CreateDIYCETimer("SSBleed", 6.5) --Change the value between 6 -> 7.5 depending on your lag.
			CreateDIYCETimer("LBBleed", 5) --Change the value between 7 ->  8.5 depending on your lag.
			--goat2: 0 = Buffs, 1 = Melee, 2 = Ranged, 3 = Cooldowns & Potions, 4 = Longer Cooldowns
           
			if (goat2 == "0") then
				Skill =  {
					{ name = "Enhanced Armor",                      use = (not pbuffs["Enhanced Armor"]) },
					{ name = "ItemID: 207200",		use = not pbuffs[506684] and CE.HaveItem(207200) and CE.ItemCD(207200)},	-- Unbridled Enthusiasm
					--{ name = "ItemID: 207202", 		use = not pbuffs[506686] and CE.HaveItem(207202) and CE.ItemCD(207202)},	-- Clear Thought
					{ name = "ItemID: 207203",		use = not pbuffs[506687] and CE.HaveItem(207203) and CE.ItemCD(207203)},	-- Lucky Target
					{ name = "ItemID: 207206", 		use = not pbuffs[506690] and CE.HaveItem(207206) and CE.ItemCD(207206)},	-- Scarlet Love
					{ name = "Lion's Protection",                   use = (not pbuffs["Lion's Protection"]) },
					{ name = "Searing Light",                   	use = (not pbuffs["Searing Light"]) },
					{ name = "Poison",                      		use = ((not pbuffs["Poisonous"]) and CE.HaveItem(200762)) },
						}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
					{ name = "Informer",                           use = ((not pbuffs["Informer"])) },
					{ name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs["Strong Stimulant"])) },
					{ name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
				
			if ((enemy) and (goat2 == "1")) then
				Skill2 = {
					{ name = "Wound Attack",                       	use = ((EnergyBar1 >= 35) and ((tbuffs["Bleed"]) and (tbuffs["Grievous Wound"]))) },
					{ name = "Blind Spot",                         	use = (((EnergyBar1 >= 25) and (boss) and (behind)) and (pbuffs["Premeditation"])) },
					{ name = "Low Blow",                           	use = ((EnergyBar1 >= 25) and (tbuffs["Bleed"]) ),      timer = "LBBleed",   ignoretimer = not tbuffs["Grievous Wound"] },
					{ name = "Shadowstab",                        	use = (EnergyBar1 >= 20),       timer = "SSBleed",  ignoretimer = not tbuffs["Bleed"]},
					{ name = "Disarmament",                        	use = (not tbuffs["Disarmament IV"])},
					{ name = "Punishment",                     		use = (tbuffs["Light Seal III"]) },
					{ name = "Holy Strike",                     	use = (true) },
						}
			elseif ((enemy) and (goat2 == "pvp")) then
				Skill2 = {
					{ name = "Energy Thief",                       use = ((boss) and (EnergyBar1 < 20) and (thealth < 0.6) and (not pbuffs["Energy Thief"])) },
					{ name = "Wound Attack",                       use = ((EnergyBar1 >= 35) and ((tbuffs[500654]) and (tbuffs[620314]))) },
					{ name = "Blind Spot",                         use = (((EnergyBar1 >= 25) and (boss) and (behind)) and (pbuffs["Energy Thief"] or pbuffs["Premeditation"])) },
					{ name = "Shadowstab",                         use = (EnergyBar1 >= 20),       timer = "SSBleed",  ignoretimer = not tbuffs[500654]},
					{ name = "Low Blow",                           use = (((EnergyBar1 >= 25) and (tbuffs[500654])) or (pbuffs["Energy Thief"])),      timer = "LBBleed",   ignoretimer = not tbuffs["Energy Thief"] },
					{ name = "Throat Attack",                      use = ((EnergyBar2 >= 50) and (boss or elite) and (silenceThis)) },
					{ name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
					{ name = "Wrist Attack",                       use = ((EnergyBar2 >= 50) and (boss)) },
					{ name = "Joint Blow",                         use = (EnergyBar2 >= 20) },
					{ name = "Shot",                               use = (true) },
						}
			elseif ((enemy) and (goat2 == "2")) then
				Skill2 = {
					{ name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
					{ name = "Shot",                               use = (true) },
						}
			end
		-------------------------
		--    ROGUE/DRUID      --
		-------------------------
		elseif subClass == "DRUID" then
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
					{ name = "Informer",                           use = ((not pbuffs["Informer"])) },
					{ name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs["Strong Stimulant"])) },
					{ name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
				
			if ((enemy) and (goat2 == "1")) then -- Main DPS combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		-------------------------
		--    ROGUE/PRIEST     --
		-------------------------
		elseif subClass == "AUGUR" then
			--Timers for this class
			CreateDIYCETimer("SSBleed", 6.5) --Change the value between 6 -> 7.5 depending on your lag.
			CreateDIYCETimer("LBBleed", 8.5) --Change the value between 7 ->  8.5 depending on your lag.
			--goat2: 0 = Buffs, 1 = Melee, 2 = Ranged, 3 = Cooldowns & Potions, 4 = Longer Cooldowns
            
			if (goat2 == "0") then
				Skill =  {
					{ name = "Blessed Spring Water",                use = (not pbuffs["Blessed Spring Water"]) },
					{ name = "Magic Barrier",                      	use = (not pbuffs["Magic Barrier"]) },
					{ name = "ItemID: 207200",		use = not pbuffs[506684] and CE.HaveItem(207200) and CE.ItemCD(207200)},	-- Unbridled Enthusiasm
					--{ name = "ItemID: 207202", 		use = not pbuffs[506686] and CE.HaveItem(207202) and CE.ItemCD(207202)},	-- Clear Thought
					{ name = "ItemID: 207203",		use = not pbuffs[506687] and CE.HaveItem(207203) and CE.ItemCD(207203)},	-- Lucky Target
					{ name = "ItemID: 207206", 		use = not pbuffs[506690] and CE.HaveItem(207206) and CE.ItemCD(207206)},	-- Scarlet Love
					{ name = "Poison",                      		use = ((not pbuffs["Poisonous"]) and CE.HaveItem(200762)) },
						}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
					{ name = "Informer",                           use = ((not pbuffs["Informer"])) },
					{ name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs["Strong Stimulant"])) },
					{ name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end

			if ((enemy) and (goat2 == "1")) then
				Skill2 = {
					{ name = "Regenerate",             				use = ((not pbuffs["Regenerate"]) and (phealth < 0.80)) },
					{ name = "Urgent Heal",             			use = (phealth < 0.50) },
					{ name = "Wound Attack",                       	use = ((EnergyBar1 >= 35) and ((tbuffs["Bleed"]) and (tbuffs[620314]))) },
					{ name = "Blind Spot",                         	use = (((EnergyBar1 >= 25) and (boss) and (behind)) and (pbuffs["Premeditation"])) },
					{ name = "Shadowstab",                         	use = (EnergyBar1 >= 20),       timer = "SSBleed",  ignoretimer = not tbuffs["Bleed"]},
					{ name = "Low Blow",                           	use = ((EnergyBar1 >= 30) and (tbuffs["Bleed"])) },
					{ name = "Combo Throw",                     			use = (true) },
					{ name = "Throw",                     			use = (true) },
						}
			elseif ((enemy) and (goat2 == "2")) then
				Skill2 = {
					{ name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
					{ name = "Shot",                               use = (true) },
						}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		-------------------------
		--    ROGUE/WARDEN     --
		-------------------------
		elseif subClass == "WARDEN" then
			--Timers for this class
			CreateDIYCETimer("blade", 20)
			CreateDIYCETimer("wood", 5)
			--goat2: 0 = Buffs, 1 = Melee, 2 = Ranged, 3 = Cooldowns & Potions, 4 = Boss Food
					
			if (goat2 == "0") then
				Skill =  {
					{ name = "Briar Shield",                      	use = (not pbuffs["Briar Shield"]) },
					{ name = "Wound Patch",                      	use = (not pbuffs["Wound Patch"]) },
					{ name = "ItemID: 207200",		use = not pbuffs[506684] and CE.HaveItem(207200) and CE.ItemCD(207200)},	-- Unbridled Enthusiasm
					--{ name = "ItemID: 207202", 		use = not pbuffs[506686] and CE.HaveItem(207202) and CE.ItemCD(207202)},	-- Clear Thought
					{ name = "ItemID: 207203",		use = not pbuffs[506687] and CE.HaveItem(207203) and CE.ItemCD(207203)},	-- Lucky Target
					{ name = "ItemID: 207206", 		use = not pbuffs[506690] and CE.HaveItem(207206) and CE.ItemCD(207206)},	-- Scarlet Love
					{ name = "Poison",                      		use = ((not pbuffs["Poisonous"]) and CE.HaveItem(200762)) },
						}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
					{ name = "Informer",                           use = ((not pbuffs["Informer"])) },
					{ name = "Savage Power",                       use = ((not pbuffs["Savage Power"])) },
					{ name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs["Strong Stimulant"])) },
					{ name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end

			if ((enemy) and (goat2 == "1")) then
				Skill2 = {
					{ name = "Bloodthirsty Blade",           	   use = (true),	timer = "blade"  },
					{ name = "Power of the Wood Spirit",           use = ((EnergyBar1 < 20) and (pctEB2 >= 0.06)) },
					{ name = "Wound Attack",                       use = ((EnergyBar1 >= 35) and (tbuffs["Bleed"]) and (tbuffs[500704])) },
					{ name = "Weak Point Strike",           	   use = ((pctEB2 >= 0.08) and (EnergyBar1 < 35))},
					{ name = "Low Blow",                           use = ((EnergyBar1 >= 25) and (tbuffs["Bleed"])) },
					{ name = "Shadowstab",                         use = (EnergyBar1 >= 20) },
						}
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		-------------------------
		--    ROGUE/WARRIOR    --
		-------------------------
		elseif subClass == "WARRIOR" then
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
					{ name = "Informer",                           use = ((not pbuffs["Informer"])) },
					{ name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs["Strong Stimulant"])) },
					{ name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
				
			if ((enemy) and (goat2 == "1")) then -- Main DPS combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		-------------------------
		--    ROGUE/CHAMPION    --
		-------------------------
		elseif subClass == "PSYRON" then
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
					{ name = "Informer",                           use = ((not pbuffs["Informer"])) },
					{ name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs["Strong Stimulant"])) },
					{ name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
				
			if ((enemy) and (goat2 == "1")) then -- Main DPS combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		-------------------------
		--    ROGUE/WARLOCK    --
		-------------------------
		elseif subClass == "HARPSYN" then
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
					{ name = "Informer",                           use = ((not pbuffs["Informer"])) },
					{ name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs["Strong Stimulant"])) },
					{ name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
				
			if ((enemy) and (goat2 == "1")) then -- Main DPS combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		end
	end
    --End Player Skill Sequences
    if (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end
end
